package com.itheima.d3_Calendar;

import java.util.Calendar;

public class Test {
    public static void main(String[] args) {
        // 得到Calendar类
        Calendar calendar = Calendar.getInstance();

        System.out.println(calendar);
        // 获取日历信息 get方法
        int year = calendar.get(Calendar.YEAR);
        int month = calendar.get(Calendar.MONTH)+1;
        System.out.println(year);
        System.out.println(month);

        calendar.add(Calendar.DAY_OF_YEAR,10);
        calendar.add(Calendar.MINUTE,10);
        System.out.println(calendar);
    }
}
